<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <th:block th:include="include :: header('电子名片信息表列表')" />
</head>
<body class="gray-bg">
     <div class="container-div">
        <div class="row">
            <div class="col-sm-12 search-collapse">
                <form id="formId">
                    <div class="select-list">
                        <ul>
                            <li>
                                <label>id：</label>
                                <input type="text" name="bcId"/>
                            </li>
                            <li>
                                <label>手机号：</label>
                                <input type="text" name="bcUserPhone"/>
                            </li>
                            <li>
                                <label>公司地址：</label>
                                <input type="text" name="bcAddress"/>
                            </li>
                            <li>
                                <label>x坐标：</label>
                                <input type="text" name="bcXCoordinate"/>
                            </li>
                            <li>
                                <label>y坐标：</label>
                                <input type="text" name="bcYCoordinate"/>
                            </li>
                            <li>
                                <label>公司名称：</label>
                                <input type="text" name="bcName"/>
                            </li>
                            <li>
                                <label>职位：</label>
                                <input type="text" name="bcPosition"/>
                            </li>
                            <li>
                                <label>姓名：</label>
                                <input type="text" name="bcUserName"/>
                            </li>
                            <li>
                                <label>邮箱：</label>
                                <input type="text" name="bcMailbox"/>
                            </li>
                            <li>
                                <label>微信号：</label>
                                <input type="text" name="bcWxNumber"/>
                            </li>
                            <li>
                                <label>用户id：</label>
                                <input type="text" name="userId"/>
                            </li>
                            <li>
                                <label>公司id：</label>
                                <input type="text" name="pcId"/>
                            </li>
                            <li>
                                <label>插入时间：</label>
                                <input type="text" class="time-input" placeholder="请选择插入时间" name="pcInsdate"/>
                            </li>
                            <li>
                                <label>更新时间：</label>
                                <input type="text" class="time-input" placeholder="请选择更信息时间" name="pcUptime"/>
                            </li>
                            <li>
                                <label>状态：</label>
                                <input type="text" name="pcStatus"/>
                            </li>
                            <li>
                                <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
                                <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
                            </li>
                        </ul>
                    </div>
                </form>
            </div>

            <div class="btn-group-sm" id="toolbar" role="group">
                <a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="system:card:add">
                    <i class="fa fa-plus"></i> 添加
                </a>
                <a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="system:card:edit">
                    <i class="fa fa-edit"></i> 修改
                </a>
                <a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="system:card:remove">
                    <i class="fa fa-remove"></i> 删除
                </a>
                <a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="system:card:export">
                    <i class="fa fa-download"></i> 导出
                </a>
            </div>
            <div class="col-sm-12 select-table table-striped">
                <table id="bootstrap-table"></table>
            </div>
        </div>
    </div>
    <th:block th:include="include :: footer" />
    <script th:inline="javascript">
        var editFlag = [[${@permission.hasPermi('system:card:edit')}]];
        var removeFlag = [[${@permission.hasPermi('system:card:remove')}]];
        var prefix = ctx + "system/card";

        $(function() {
            var options = {
                url: prefix + "/list",
                createUrl: prefix + "/add",
                updateUrl: prefix + "/edit/{id}",
                removeUrl: prefix + "/remove",
                exportUrl: prefix + "/export",
                modalName: "电子名片信息表",
                columns: [{
                    checkbox: true
                },
                {
                    field: 'bcId',
                    title: 'id',
                    visible: true
                },
                // {
                //     field: 'bcUserImg',
                //     title: '头像'
                // },
                {
                    field: 'bcUserPhone',
                    title: '手机号'
                },
                // {
                //     field: 'bcAddress',
                //     title: '公司地址'
                // },
                // {
                //     field: 'bcXCoordinate',
                //     title: 'x坐标'
                // },
                // {
                //     field: 'bcYCoordinate',
                //     title: 'y坐标'
                // },
                {
                    field: 'bcName',
                    title: '公司名称'
                },
                {
                    field: 'bcPosition',
                    title: '职位'
                },
                {
                    field: 'bcUserName',
                    title: '姓名'
                },
                // {
                //     field: 'bcMailbox',
                //     title: '邮箱'
                // },
                // {
                //     field: 'bcWxNumber',
                //     title: '微信号'
                // },
                // {
                //     field: 'bcWxImg',
                //     title: '微信二维码'
                // },
                // {
                //     field: 'bcBriefIntroduction',
                //     title: '个人简介'
                // },
                // {
                //     field: 'bcFile',
                //     title: '更多文件'
                // },
                // {
                //     field: 'bcImgList',
                //     title: '图片展示'
                // },
                {
                    field: 'userId',
                    title: '用户id'
                },
                {
                    field: 'pcId',
                    title: '公司id'
                },
                {
                    field: 'pcInsdate',
                    title: '插入时间'
                },
                {
                    field: 'pcUptime',
                    title: '更新时间'
                },
                {
                    field: 'pcStatus',
                    title: '状态'
                },
                // {
                //     field: 'pcSpeech',
                //     title: '录音信息'
                // },
                // {
                //     field: 'pcProgramCode',
                //     title: '小程序码'
                // },
                {
                    title: '操作',
                    align: 'center',
                    formatter: function(value, row, index) {
                        var actions = [];
                        actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.bcId + '\')"><i class="fa fa-edit"></i>编辑</a> ');
                        actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.bcId + '\')"><i class="fa fa-remove"></i>删除</a>');
                        return actions.join('');
                    }
                }]
            };
            $.table.init(options);
        });
    </script>
</body>
</html>